<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title> The arguments object </title>
  <script>

function printArgs() {
    for (var i = 0; i < arguments.length; i++) {
        console.log(arguments[i]);
    }
}

printArgs("one", 2, 1+2, "four");


function emote(kind) {
	if (kind === "silence") {
		console.log("Player sits in silence");
	} else if (kind === "says") {
		console.log("Player says: '" + arguments[1] + "'");
	} 
}

emote("silence");
emote("says", "Stand back!");

  </script>
</head>
<body>
</body>
</html>
